package cn.tang.crm.config;

import org.apache.log4j.Logger;

public class Configure {
	private static Logger logger = Logger.getLogger(ServerConfigParser.class);

	public String dbDriver = "org.h2.Driver";
	public String dbURL = "jdbc:h2:h2/bin/asmm";
	public String dbUserName = "root";
	public String dbPassword = "";
	public String dbName = "asmm";

	private static Configure mConfigure = new Configure();

	private Configure() {
		init();
	}

	public static Configure getInstance() {
		return mConfigure;
	}

	public void init() {
		logger.info("init configuration");
		new ServerConfigParser().parse(this);
	}
	
	public String getDbDriver() {
		return dbDriver;
	}

	public void setDbDriver(String dbDriver) {
		this.dbDriver = dbDriver;
	}

	public String getDbURL() {
		return dbURL;
	}

	public void setDbURL(String dbURL) {
		this.dbURL = dbURL;
	}

	public String getDbUserName() {
		return dbUserName;
	}

	public void setDbUserName(String dbUserName) {
		this.dbUserName = dbUserName;
	}

	public String getDbPassword() {
		return dbPassword;
	}

	public void setDbPassword(String dbPassword) {
		this.dbPassword = dbPassword;
	}

	public String getDbName() {
		return dbName;
	}

	public void setDbName(String dbName) {
		this.dbName = dbName;
	}
}
